/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.myapp.autoEntity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Matersys 86
 */
@Entity
@Table(name = "venta", catalog = "tiendita", schema = "")
@NamedQueries({
    @NamedQuery(name = "VentaEntity.findAll", query = "SELECT v FROM VentaEntity v"),
    @NamedQuery(name = "VentaEntity.findByIdventa", query = "SELECT v FROM VentaEntity v WHERE v.idventa = :idventa"),
    @NamedQuery(name = "VentaEntity.findByNick", query = "SELECT v FROM VentaEntity v WHERE v.nick = :nick"),
    @NamedQuery(name = "VentaEntity.findByTotal", query = "SELECT v FROM VentaEntity v WHERE v.total = :total")})
public class VentaEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "IDVENTA")
    private Integer idventa;
    @Basic(optional = false)
    @Column(name = "NICK")
    private String nick;
    @Basic(optional = false)
    @Column(name = "TOTAL")
    private String total;

    public VentaEntity() {
    }

    public VentaEntity(Integer idventa) {
        this.idventa = idventa;
    }

    public VentaEntity(Integer idventa, String nick, String total) {
        this.idventa = idventa;
        this.nick = nick;
        this.total = total;
    }

    public Integer getIdventa() {
        return idventa;
    }

    public void setIdventa(Integer idventa) {
        this.idventa = idventa;
    }

    public String getNick() {
        return nick;
    }

    public void setNick(String nick) {
        this.nick = nick;
    }

    public String getTotal() {
        return total;
    }

    public void setTotal(String total) {
        this.total = total;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idventa != null ? idventa.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof VentaEntity)) {
            return false;
        }
        VentaEntity other = (VentaEntity) object;
        if ((this.idventa == null && other.idventa != null) || (this.idventa != null && !this.idventa.equals(other.idventa))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.myapp.autoEntity.VentaEntity[idventa=" + idventa + "]";
    }

}
